import info from "../action"
let dataReducer=(state={num:10},action:any)=>{
    switch(action.type){
        case info.ADDNUM:return {num:state.num+action.payload};
        case info.REDUCE:return {num:state.num-action.payload};
    }
    return state;


}
export default dataReducer